Skip to content

[bug-hunter] Retain active import recovery journal#1572

Merged
r3dbars merged 11 commits into
mainfrom
codex/retain-active-import-journal-20260719
Jul 23, 2026
Merged

[bug-hunter] Retain active import recovery journal#1572
r3dbars merged 11 commits into
mainfrom
codex/retain-active-import-journal-20260719

Conversation

@r3dbars

@r3dbars r3dbars commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

Keep the durable imported-audio journal until the active transcription reaches a terminal state.

User impact

The import journal was deleted as soon as model preparation handed work to the in-memory transcription task. A crash or force-quit during inference could therefore leave the scratch audio with no recovery journal or failed-queue record.

Fix

  • Move journal cleanup behind a task-terminal callback.
  • Invoke it only after transcript side effects commit, or after a normal failure/cancellation path has handled the scratch file.
  • Keep the journal while inference is in flight so the next launch can recover the import.
  • Add a blocking-engine regression test that asserts the callback waits for transcript commit.

Evidence and scope

  • Confirmed against fresh origin/main at 2f8e01ef.
  • The durable queue-journal work already on main covers model preparation; this closes the active-import handoff gap.
  • Open PR Repair speech route recovery on current main #1569 covers speech-route recovery and does not overlap this change.

Verification

  • swift test: 801 tests passed, 13 expected skips, 0 failures.
  • bash run-integration-smoke.sh: passed.
  • bash build.sh --no-open: signed app build and launch smoke passed; launch time 1352 ms against a 3000 ms budget.
  • bash run-tests.sh: 13,046 tests passed, 0 failures.
  • Independent local adversarial review: accepted the finding as real, reproducible from the current-main control flow, and safely fixable with this narrow callback handoff.

Proof boundary

The deterministic test covers the in-flight crash window, but no manual crash/force-quit or real hardware/audio proof was performed in this run.

@r3dbars
r3dbars marked this pull request as ready for review July 23, 2026 03:50
@r3dbars
r3dbars marked this pull request as draft July 23, 2026 10:43
@r3dbars
r3dbars marked this pull request as ready for review July 23, 2026 11:04
@r3dbars
r3dbars merged commit 8c94921 into main Jul 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant